class Book:
    def __init__(self, title, author, publish_date):
        self.title = title
        self.author = author
        self.publish_date = publish_date

    def get_title(self):
        """
        获取书名
        :return: 返回书名
        """
        return self.title

    def get_author(self):
        """
        获取作者
        :return: 返回作者
        """
        return self.author

    def get_publish_date(self):
        """
        获取出版日期
        :return: 返回出版日期
        """
        return self.publish_date


class Library:
    def __init__(self):
        self.books = set()

    def add_book(self, book):
        """
        添加图书
        :param book:
        """
        self.books.add(book)
        print(f"{book.title} 添加成功")

    def borrow_book(self, book):
        """
        借书
        """
        if book in self.books:
            self.books.remove(book)
            print(f"{book.title} 借阅成功")
        else:
            print(f"{book.title} 没有找到")

    def return_book(self, book):
        """
        还书
        """
        if book not in self.books:
            self.books.add(book)
            print(f"{book.title} 还书成功")
        else:
            print(f"{book.title} 已存在，你还对地方了吗？")

    def show_books(self):
        """
        展示图书
        """
        print("-----------------" * 2)
        for i, book in enumerate(self.books):
            print(f"{'书名':^10}:{book.get_title():^20}|")
            print(f"{'作者':^10}:{book.get_author():^20}|")
            print(f"{'出版':^10}:{book.get_publish_date():^20}|")
            print(f"----------------{i+1}----------------")


if __name__ == "__main__":
    library = Library()
    sophie = Book("Sophie's World", "Jostein Gaarder", "2005")
    siddhartha = Book("Siddhartha", "Herman Hesse", "1922")
    library.add_book(sophie)
    library.add_book(siddhartha)
    library.show_books()
    library.borrow_book(sophie)
    library.return_book(siddhartha)
    library.return_book(sophie)
